package engine.display.Story.ActionItem
{
	import engine.display.Story.StoryMoveUI;
	import engine.display.Story.StoryVo;
	import engine.display.newAttack.AttackLogic;
	import engine.display.newAttack.FightLogic;
	import engine.ui.MainUIManager;
	
	import flash.events.Event;
	
	import newx.StageInfo;

	/**
	 *战报 
	 * @author yanghr
	 * 
	 */	
	public class FightXmlStory extends BaseAction
	{
		private var _isPlaying:Boolean=false
		private static var _self:FightXmlStory
		public function FightXmlStory()
		{
//			txtLoader.addEventListener(Event.COMPLETE,loadTxtComplete);
			AttackLogic.getInstance().fightLogic.addEventListener( FightLogic.FIGHT_OVER, fightOver );
			super();
		}
		private function fightOver(e:Event):void
		{
			if(_isPlaying)
			{
				_isPlaying=false;
				MainUIManager.getInstance().hideAll();
				actionOver();
			}
			
		}
		public static function getInstance():FightXmlStory
		{
			if(_self == null)
			{
				_self	=	new FightXmlStory();
			}
			return _self;
		}
		override public function showInfo(val:StoryVo):void
		{
			_isPlaying=true;	
			var str:String=val.TalkInfo;
//			txtLoader.load(ResPath.XMLTXT+str+".idres");
//			MainUIManager.getInstance().showAll();
			AttackLogic.getInstance().enterFakeAttack((str));
		}
	}
		
}